<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="vue.js"></script>
</head>

<body>
    <template id="login"> 
        <div>
            <h1>{{ title }}</h1>
            <span>欢迎进入</span>
        </div>
    </template>
    <div id="app">
        <login></login>
    </div>
</body>

</html>
<script>
    Vue.component("login", {
        template: "#login",
        data: function() {
            return {
                title: "登陆组件"
            }

        }
    })

    new Vue({
        el: "#app",
        data: {

        },
        methods: {

        }
    })
</script>